Contents

For Help on Help, Press F1

 Text Editor Module

The Text Editor module is one of the most versatile and often­used components of Calamus. The Text Editor module combines the basic functions of a text editor with the ability to insert and edit control codes which are used to design and manipulate layout.

The Text Editor module is accessed by selecting a text frame and clicking the Open Text Editor icon in the Tools command group of the Text module or by using the keyboard equivalent, [Alt] T.

Above the text editor window are seven pull­down menus and six command icons.

The first four menus are File, Edit, Block and Bookmark. These menus contain functions for working with text. The Insert menu contains functions for inserting text control codes. The Setup menu allows you to configure the Text Editor's settings. The Help menu is a standard Windows item that provides detailed information about the Text Editor module.

The 6 icons in the Text Editor module provide an alternative way to access some of the functions in the pull­down menus. The first two typewriter icons are used to import and export text between the text editor and the active text frame in a document. The trashcan icon is used to delete text. The next three icons are used to add and edit control codes for text styles, text control codes and text rulers. Each icon is described below.

Text Editor Icons

File Menu

Block Menu

Bookmark Menu

Insert Menu

Setup Menu

Help Menu


Text Editor Icons

There are 6 icons in the upper part of the text editor. The first three affect the handling of text:

  Send Text into Text Frame

  Send Text into Text Editor

  Delete Text

The latter three provide access to text control codes:

  Insert Text Style

  Insert Text Control Code

  Insert Text Ruler

Send Editor Text into Text Frame

Send Text into Text Editor

Delete Text

Insert Text Style

Insert Text Control Code

Insert Text Ruler


Send Editor Text into Text Frame

This function will send text from the text editor into the selected text frame. If no frame is selected, you will be prompted to select one before using this function. If there is already text in the selected text frame, this alert will appear:

You may Add to the existing text; Replace existing text; or Merge text at the cursor position. You may also Cancel and continue working in the text editor.


Send Text into Text Editor

This function copies text from the active text frame to the text editor. In addition to editing text, you may use the various menu items or icons to insert text styles, text control codes and text ruler codes.

When you have finished editing, use Send Editor Text into Text Frame to transfer the text editor's contents into the active text frame. If a text frame is not selected, you will remain in the text editor window.


Delete Text

This function will delete the contents of the text editor. When you click the trashcan icon, you will be asked to confirm the deletion before it is made. After clicking OK, the entire contents of the text editor will be deleted and the editor will remain open for further editing.


Insert Text Style

This function allows you to insert text style codes in the text editor window. When you click this icon, the Select Style window appears:

This window displays all text styles currently in the text style list. Both Internal and List text styles are shown in this window. Click the name of the text style you wish to insert and then click OK. A text style control code, [s] or [style], will be inserted at the cursor position. The selected text style will govern all text until the next text style control code occurs.

You can also create or modify text styles in the Text Editor module. To create a new text style, click the Add button. To modify an existing text style, click the style name in the window, then click the Edit button. In both cases, the Edit Text Style dialog box will appear:

Edit Text Style Dialog Box


Insert Text Control Code

This function allows you to insert any of 15 text control codes that govern functions found in the Text module. When you click this icon, the Insert Text Control Code window appears:

Left to right from the top row, the text control codes are Insert Current Page Number, Insert Following Page Number, Insert Date, Insert Time, Insert Chapter Number, Insert Comment, Insert Reference to Previous Page, Insert Reference to Next Page, Footnote Entry, Insert Paragraph End, Index Entry, Insert Manual Kerning, Force Piping to Next Frame, Insert Variable Hard Space, and Insert Drop Cap.

There are three ways to insert a text control code. First position the text cursor. Then click Insert Code in the Insert pull­down menu; click the Insert Text Control Code icon; or click the right mouse button to pop­up a list of control codes. Then, select the required control code.

In some cases, inserting a text control code requires entry of a page or chapter number, or text for an index or footnote. Once the required information is entered, the respective window can be closed and a text control code will be inserted at the cursor position. You may also edit the contents of a control code by double­clicking it.

The function of each text control code is described in the Control Codes command group of the Text module, earlier in this chapter.


Insert Text Ruler

This function allows you to insert a text ruler at the cursor position. When you click this icon, the Change Ruler dialog box appears:

As you can see, all text ruler elements are available for selection or editing. Select the required elements, input the desired values and click OK to insert the text ruler, which will be represented by a  control code, [r] or [ruler], at the cursor position. To change ruler settings, simply double­click the text ruler code to recall the Change Ruler dialog box.

Each text ruler element is explained in the Text Ruler command group of the Text module, earlier in this chapter.


File Menu

Functions:

 	Info

 	Exit

 	Abort

The File menu has three functions, the last two of which correspond to the Send Text functions described earlier in this chapter.


Info

Info provides statistical information about the text in the text editor window. When you click the Info menu item, this dialog box appears:

Number of Characters, Number of Lines and Number of Words are self­explanatory. Soft Lines refers to the normal wordwrap that occurs when text reaches the edge of the text frame or the text editor window. Hard Lines refers to a forced line end that is followed by line spacing. Hard line ends are created by using [Shift][Enter]. Paragraphs are created by using the [Enter] key and are followed by paragraph spacing. Line spacing and Paragraph spacing can be set by clicking the [r] or [ruler] button in the text editor window. For more information, see the Text module, earlier in this chapter.


Exit

Exit will close the text editor. If there is text in the editor, the dialog box at right will appear:

If you choose Add, the editor text will be added to the end of the piping chain. Replace will overwrite the text in the piping chain with the editor text. Merge will insert the editor text at the cursor position in the text frame.


Abort

This function is similar to the Exit command. When you use the Abort command, you will be prompted to save text which is in the editor. If you select No, the editor will close and the text will be deleted. The text in the active text frame will not be affected. If you select Yes, you will be prompted to Add, Replace or Merge text in the selected text frame as in the Exit command, described previous.


Edit Menu

Functions:

 	Undo

 	Reformat Text

 	Search

 	Replace

 	Repeat Search

 	Go to Line

The six functions in the Edit menu are useful for working with text. The Undo function will help correct mistakes. The Search and Replace functions work with both text and text control codes.


Undo

As the name implies, this function will undo the last action in the editor. If you just deleted a block of text or inserted a control code, the Undo command will reverse that action. You can even Undo a search and replace command! You may set the size of the Undo buffer in the Editor Options of the Setup menu described below.


Reformat Text

You can set up automatic wordwrap in the Editor Options so that all text remains visible in the text editor window. If wordwrap is inactive, the Reformat Text function can be used to manually bring all text into view. You may also find that, when you send text from a frame into the text editor, some text may not be visible. The Reformat Text command will wrap all text in the text editor window.


Search

The Search function will search for a chosen word, phrase, sentence or passage in the text editor. You can also search for text control codes, text rulers and text styles, or search using text cut from the Windows clipboard if the WINCLIP.CXM is loaded. When you choose the Search command, the Search Text window will open.

Type the text you want to search for into the text window. If you wish to search for a control code, text style or text ruler, click the Insert menu at the top­left corner of the Search Text dialog box. A pull­down menu appears:

Select the code you wish to search for. If you select Control Code, the Insert Text Control Code dialog box appears. Click the type of control code you wish to find. Depending on the type of control code selected, you may have to enter specific information in an accompanying dialog box. For example, if you select a footnote code, you must enter the text for the footnote; for a kerning code, you must enter the kerning values; for a comment code, you must enter the text of the comment The respective control code will appear in the Find Text window.

You may also search for a specific text ruler. Click the Text Ruler item in the Insert menu and the Change Ruler dialog box will appear. Enter the settings for the ruler you wish to find and click OK. The text ruler button, [r] or [ruler], will appear in the Find Text window.

To search for a specific text style, click the Text Style item in the Insert menu. The Select Style dialog box will appear. Select a text style and click OK. The text style button, [s] or [style], will appear in the Find Text window.

You may use the Clip Paste function to insert any text that was cut to the Windows clipboard from a text frame. This function also inserts a text block that was copied using the block function. You may also insert text from the text editor in the Find Text window. Highlight a word or phrase in the text editor window and it will be appear in the Find Text window when you Search or Replace.

The right side of the Search Text dialog box contains the parameters for doing a search.

Full Word will locate the search text in complete words only. For example, if the search text is hat, the Full Word option will not locate that. Case Sensitive allows you to search for a text string with matching upper and lowercase. For example, if Case Sensitive is selected, hat would not locate Hat because there is no case match on the h. Ignore Hyph. will ignore hyphenated words, treating them as if they were whole.

Up and Down indicate the search direction in the text editor window.

The last group of choices indicates the starting point of the search. You may begin at the Text Start, Text End or From the Cursor.

After you have entered the search text or control code and chosen the search parameters, click the Search button to begin the search. If a match is found, the search text will be highlighted in the text editor window, at which point you can continue or abort. If there is no match, an alert will tell you so. Sometimes, it is useful to use a short search string to locate a word or phrase.

Cancel will take you back to the text editor window. A Search will not be performed.


Replace

This function will replace one text string with another that you have specified. Its functions are similar to the Search command described above. A number of the parameters are identical. When you select this command, the Replace Text window appears:

As you can see, it is almost the same as the Search Text window, above, except that the text window is divided into two parts: one for search text and the other for replacement text. Text or text control codes are entered in both windows in the same way as described in Search, above.

The choices on the right side of the window are almost identical to those for the Search command. Another button will Prompt you to confirm replacement when a match is found.

The Replace option will proceed to the first occurrence of the search text. If you have selected Prompt, an alert will ask you to confirm replacement.

The Replace All command will find each occurrence of the search text. As with Replace, if you have selected Prompt, you will be asked to confirm replacement each time.


Repeat Search

This function will repeat the last Search or Replace operation. The same search string and parameters will be used.


Go to Line

This function will move the cursor to a specified line in the text editor window. When you select this command, the Go to Line dialog box will appear. Enter the line number to which you wish to move and click OK. The text cursor will appear at the beginning of that line. If necessary, the text will scroll to the correct line.


Block Menu

Functions:

 	Copy Block

 	Paste Block

 	Delete Block

 	Cut Block

 	Block Operations

Select All

In order to use any block operation in the text editor window, it is first necessary to mark a block of text. There are three ways to do this. If you wish to mark all text in the text editor window, use the Select All function. To mark a section of text, place the text cursor at the start of the block and press the [Shift] key while using the arrow keys to move the text cursor to the desired endpoint. You may also use the text cursor to mark a section; simply drag the cursor over the desired text.


Copy Block

This function will copy a text block to the Windows clipboard. From there, you may Paste the block at the cursor location. The original text block will not be affected. Click Copy Block after you have highlighted a text block. Only one text block can be held in the clipboard at a time. Therefore, if you copy a new text block, the one in the clipboard will be overwritten.


Paste Block

This function is the complement of the Copy Block function, previous. After you have copied a text block, you can insert it at the cursor position in the text editor window by using this command. Place your cursor at the desired location and click Paste Block in the Block menu. You may paste the same text block several times.


Delete Block

This function will delete a text block in the text editor window. After you have highlighted a text block, click Delete Block in the Block menu. The highlighted text will disappear. If you wish to restore it, immediately use the Undo command in the Edit menu.

You may delete a highlighted text block by clicking the [Delete] key.


Cut Block

This function will transfer a text block to the clipboard. From there, you can Paste the block at the cursor location. This function is useful for moving text blocks within the text editor.


Block Operations

This function allows you to change the letter case in a text block. When you select this command, a submenu appears to the right.

Select the desired option and the highlighted text block will change to upper or lower case.


Select All

As mentioned previously, this menu item will select all text in the text editor window. This feature may be used with any block function.


Bookmark Menu

Functions:

Set Bookmark

Go to Bookmark

This function inserts a hidden marker (bookmark) to which you can move quickly. A bookmark is inserted at the current cursor position. Markers are invisible so you will not see a control code in the text editor window. Note, bookmarks are not saved when you close the text editor window.


Set Bookmark

Click Set Bookmark in the Bookmark menu and the Set Bookmark dialog box appears:

Enter the bookmark into the edit field click OK. (The example uses BK.) The dialog box will close and you will return to the text editor window. You may set as many bookmarks as you like in the text editor.


Go to Bookmark

This function moves the cursor to any bookmark in the text editor window. Select the Go to Bookmark item in the Bookmark menu and the Go to Bookmark dialog box appears:

A list of current bookmarks appears in the window. Select a bookmark and click OK. The cursor will move to that bookmark in the text editor window.


Insert Menu

Functions:

 	Insert Style

 	Insert Code

 	Insert Ruler

 	Insert Macro

The first three functions in the Insert menu correspond to the last three icons in the text editor window. The last function in the Insert menu corresponds to the Text Macro command group in the Text module.

Insert Style

This menu item is identical to Insert Text Style in the Text Editor Icons area near the beginning of this section. Refer to that section for information.

Insert Code

This menu item is identical to Insert Text Control Code in the Text Editor Icons area near the beginning of this section. Refer to that section for information.

Insert Ruler

This menu item is identical to Insert Text Ruler in the Text Editor Icons area near the beginning of this section. Refer to that section for information.


Insert Macro

This function works in conjunction with the Text Macro command group described in the Text Module section of this chapter. If text macros have been defined for the current document, they may be loaded into the text editor window by clicking this menu item. The dialog box at right will appear:

Click the text macro you wish to insert and it will appear at the cursor position.


Setup Menu

Functions:

 	Editor Options

 	Select Editor Font

 	Select Code Font

 	Save Setup

The Setup menu allows you to customize the appearance of text and control codes in the text editor window. You can also configure the Undo and text formatting functions of the Text Editor module.


Editor Options

This function controls parameters for using the text editor. When you select Editor Options in the Setup menu, this dialog box appears:

This options in the dialog box are divided into two groups. The left half affects text functions in the text editor window; the right half affects the appearance of text and control codes.

Wordwrap

Reformat Text on Import

Reformat Text on Setup Change

Undo Buffer Size

Remove Hyphenation Codes on Import

Code

Color

Mode

Set to All Codes


Code

The right half of the Editor Options dialog box is used to define the appearance of text and text control codes in the text editor window. A drop­down list contains the names of all the control codes. The first one is Drop Cap. Use the vertical scroll bar to see the rest of the list:

To define the appearance of the text or any control code, you must first select its name and it will appear at the top of the drop­down list in the Code field.


Color

Immediately below the drop­down list are two sets of color options for Normal Text Color and Selected Text Color. Normal Text Color is how text or control codes appear in the text editor window. Selected Text Color refers to the appearance of highlighted text or control codes in a text block.

When you click any of the four color boxes, a palette appears with 48 basic color boxes and 16 custom color boxes.

If you click one of the basic or custom colors and click OK, it will replace the original color square for Foreground or Background color. While you may select a different Foreground color for text or control codes, it is suggested that you leave the background color set to white to avoid too many colors in the text editor window.

You may also define a custom color for text or control codes. Click the Define Custom Colors button and the custom color palette will appear to the right. Click one of the custom color boxes to choose its color. Click a color in the custom color palette and then adjust it with the special color slider at the far right. When you have defined a custom color, click Add to Custom Colors and it will be inserted in the custom color box you first selected.


Mode

There are three Mode options for displaying control codes. Hide will make the selected control code invisible in the text editor window; Short will display the abbreviated form of the control code; Long will show the full name of the control code and any related parameters.


Set to All Codes

The Set to All Codes option will change all control codes at once. When you select Set to All Codes, the currently­selected color and Mode choice will be applied to all text and control codes.


Wordwrap

Wordwrap will automatically format text inside the text editor window so that all text is visible. Without wordwrap, text would flow to the right, past the window edge, and you would lose sight of some text.


Reformat Text on Import

Reformat Text on Import affects the display of text imported into the text editor window. Since the line lengths of an imported text file may be different from the width of the text editor window, it is possible to automatically format the imported text to fit the window.


Reformat Text on Setup Change

Reformat Text on Setup Change will reformat the text in the text editor window when you exit Editor Options. Reformatting should occur when you change control codes from Short to Long form or vice versa.


Undo Buffer Size

Undo Buffer Size allows you to determine how much memory is reserved for Undo functions. A minimum setting of 10 is required to use the Undo function. The larger the value, the greater the number of Undo levels you can use. The number of Undo levels determines how far back you can go to restore deleted text or control codes.


Remove Hyphenation Codes on Import

Remove Hyphenation Codes on Import will delete conditional hyphens inserted when you hyphenate text in a text frame. This makes it easier to work with text because distracting hyphens are removed. It is always possible to re­hyphenate text after it is exported to the text frame.


Select Editor Font

This function allows you to display text in the text editor window using any font loaded in the Program Manager's Control Panel. Choose Select Editor Font in the Setup menu and the Font dialog box will appear:

Select the Font, Font Style (Regular, Italic, Bold, Bold Italic) and Size. Text will be previewed in the Sample area. Click OK and the text in the text editor window will be displayed according to your choices.


Select Code Font

This function allows you to display control codes in the text editor window using any font loaded in the Program Manager's Control Panel. Selecting a font for control codes is identical to the method for choosing a text editor font, described immediately above.


Save Setup

This function will save the Editor Options, Editor Font and Code Font choices. To save the current text editor setup, click Save Setup in the Setup menu.


Help Menu

Functions:

 	Contents

 	About the Editor...

This function provides online information to help you use the Text Editor module. You may access the Help system by clicking Contents or by using the Search function.

Text Editor Help Contents

Text Editor Help Search

About the Text Editor


Edit Text Style Dialog Box

Refer to Text Style List in the Text Style Module, chapter 5, for information about the various options in the Edit Text Style dialog box.


Help Contents

Click the Contents menu item to enter the Text Editor Help System. When the main help menu appears, click Menus for information on each menu in the Text Editor.


About the Editor

This menu item provides information about the current version and version date of the Text Editor module.


Help Search

Click the Search menu item to access specific information about the Text Editor module. The standard Windows Search dialog box will appear. Select the appropriate topic for the information you require.